3.1.22 \(\int \frac {A+B x}{(a+c x^2) \sqrt {d+e x+f x^2}} \, dx\) [22]

Optimal. Leaf size=780 \[ \frac {\sqrt {a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \tanh ^{-1}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )-c \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {d+e x+f x^2}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}-\frac {\sqrt {-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \tanh ^{-1}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )-c \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {a B e+A \left (c d-a f+\sqrt {c^2 d^2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*c*(-2*d*f+e^2))^(1/2)))^(1/2)*(-A*c*e+B*(c*d-a*f+(c^2*d^2+a^2*f^2+a*c*(-2*d
*f+e^2))^(1/2)))^(1/2)*2^(1/2)/a^(1/2)/c^(1/2)/e^(1/2)/(c^2*d^2+a^2*f^2+a*c*(-2*d*f+e^2))^(1/2)

________________________________________________________________________________________

Rubi [A]
time = 3.39, antiderivative size = 780, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 3, integrand size = 29, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.103, Rules used = {1050, 1044, 214} \begin {gather*} \frac {\sqrt {A \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e} \sqrt {B \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )-A c e} \tanh ^{-1}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )\right )-c x \left (A \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e\right )\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {d+e x+f x^2} \sqrt {A \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e} \sqrt {B \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )-A c e}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}}-\frac {\sqrt {B \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )-A c e} \sqrt {A \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e} \tanh ^{-1}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )\right )-c x \left (A \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e\right )\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {d+e x+f x^2} \sqrt {B \left (-\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )-A c e} \sqrt {A \left (\sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}-a f+c d\right )+a B e}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {a^2 f^2+a c \left (e^2-2 d f\right )+c^2 d^2}} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[(A + B*x)/((a + c*x^2)*Sqrt[d + e*x + f*x^2]),x]

[Out]

(Sqrt[a*B*e + A*(c*d - a*f - Sqrt[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)])]*Sqrt[-(A*c*e) + B*(c*d - a*f + Sqrt
[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)])]*ArcTanh[(Sqrt[e]*(a*(A*c*e - B*(c*d - a*f + Sqrt[c^2*d^2 + a^2*f^2 +
 a*c*(e^2 - 2*d*f)])) - c*(a*B*e + A*(c*d - a*f - Sqrt[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)]))*x))/(Sqrt[2]*S
qrt[a]*Sqrt[c]*Sqrt[a*B*e + A*(c*d - a*f - Sqrt[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)])]*Sqrt[-(A*c*e) + B*(c*
d - a*f + Sqrt[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)])]*Sqrt[d + e*x + f*x^2])])/(Sqrt[2]*Sqrt[a]*Sqrt[c]*Sqrt
[e]*Sqrt[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)]) - (Sqrt[-(A*c*e) + B*(c*d - a*f - Sqrt[c^2*d^2 + a^2*f^2 + a*
c*(e^2 - 2*d*f)])]*Sqrt[a*B*e + A*(c*d - a*f + Sqrt[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)])]*ArcTanh[(Sqrt[e]*
(a*(A*c*e - B*(c*d - a*f - Sqrt[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)])) - c*(a*B*e + A*(c*d - a*f + Sqrt[c^2*
d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)]))*x))/(Sqrt[2]*Sqrt[a]*Sqrt[c]*Sqrt[-(A*c*e) + B*(c*d - a*f - Sqrt[c^2*d^2
+ a^2*f^2 + a*c*(e^2 - 2*d*f)])]*Sqrt[a*B*e + A*(c*d - a*f + Sqrt[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)])]*Sqr
t[d + e*x + f*x^2])])/(Sqrt[2]*Sqrt[a]*Sqrt[c]*Sqrt[e]*Sqrt[c^2*d^2 + a^2*f^2 + a*c*(e^2 - 2*d*f)])

Rule 214

Int[((a_) + (b_.)*(x_)^2)^(-1), x_Symbol] :> Simp[(Rt[-a/b, 2]/a)*ArcTanh[x/Rt[-a/b, 2]], x] /; FreeQ[{a, b},
x] && NegQ[a/b]

Rule 1044

Int[((g_) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> Dist[-2*
a*g*h, Subst[Int[1/Simp[2*a^2*g*h*c + a*e*x^2, x], x], x, Simp[a*h - g*c*x, x]/Sqrt[d + e*x + f*x^2]], x] /; F
reeQ[{a, c, d, e, f, g, h}, x] && EqQ[a*h^2*e + 2*g*h*(c*d - a*f) - g^2*c*e, 0]

Rule 1050

Int[((g_.) + (h_.)*(x_))/(((a_) + (c_.)*(x_)^2)*Sqrt[(d_.) + (e_.)*(x_) + (f_.)*(x_)^2]), x_Symbol] :> With[{q
 = Rt[(c*d - a*f)^2 + a*c*e^2, 2]}, Dist[1/(2*q), Int[Simp[(-a)*h*e - g*(c*d - a*f - q) + (h*(c*d - a*f + q) -
 g*c*e)*x, x]/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x] - Dist[1/(2*q), Int[Simp[(-a)*h*e - g*(c*d - a*f + q
) + (h*(c*d - a*f - q) - g*c*e)*x, x]/((a + c*x^2)*Sqrt[d + e*x + f*x^2]), x], x]] /; FreeQ[{a, c, d, e, f, g,
 h}, x] && NeQ[e^2 - 4*d*f, 0] && NegQ[(-a)*c]

Rubi steps

\begin {align*} \int \frac {A+B x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx &=-\frac {\int \frac {-a B e-A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )+\left (-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx}{2 \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}+\frac {\int \frac {-a B e-A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )+\left (-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x}{\left (a+c x^2\right ) \sqrt {d+e x+f x^2}} \, dx}{2 \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}\\ &=\frac {\left (a \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )\right ) \text {Subst}\left (\int \frac {1}{2 a^2 c \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )+a e x^2} \, dx,x,\frac {-a \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )+c \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x}{\sqrt {d+e x+f x^2}}\right )}{\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}-\frac {\left (a \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )\right ) \text {Subst}\left (\int \frac {1}{2 a^2 c \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )+a e x^2} \, dx,x,\frac {-a \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )+c \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x}{\sqrt {d+e x+f x^2}}\right )}{\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}\\ &=\frac {\sqrt {a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \tanh ^{-1}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )-c \left (a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {a B e+A \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {-A c e+B \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {d+e x+f x^2}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}-\frac {\sqrt {-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \tanh ^{-1}\left (\frac {\sqrt {e} \left (a \left (A c e-B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right )-c \left (a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )\right ) x\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {-A c e+B \left (c d-a f-\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {a B e+A \left (c d-a f+\sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}\right )} \sqrt {d+e x+f x^2}}\right )}{\sqrt {2} \sqrt {a} \sqrt {c} \sqrt {e} \sqrt {c^2 d^2+a^2 f^2+a c \left (e^2-2 d f\right )}}\\ \end {align*}

________________________________________________________________________________________

Mathematica [C] Result contains higher order function than in optimal. Order 9 vs. order 3 in optimal.
time = 0.39, size = 218, normalized size = 0.28 \begin {gather*} \frac {1}{2} \text {RootSum}\left [c d^2+a e^2-4 a e \sqrt {f} \text {$\#$1}-2 c d \text {$\#$1}^2+4 a f \text {$\#$1}^2+c \text {$\#$1}^4\&,\frac {B d \log \left (-\sqrt {f} x+\sqrt {d+e x+f x^2}-\text {$\#$1}\right )-A e \log \left (-\sqrt {f} x+\sqrt {d+e x+f x^2}-\text {$\#$1}\right )+2 A \sqrt {f} \log \left (-\sqrt {f} x+\sqrt {d+e x+f x^2}-\text {$\#$1}\right ) \text {$\#$1}-B \log \left (-\sqrt {f} x+\sqrt {d+e x+f x^2}-\text {$\#$1}\right ) \text {$\#$1}^2}{a e \sqrt {f}+c d \text {$\#$1}-2 a f \text {$\#$1}-c \text {$\#$1}^3}\&\right ] \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[(A + B*x)/((a + c*x^2)*Sqrt[d + e*x + f*x^2]),x]

[Out]

RootSum[c*d^2 + a*e^2 - 4*a*e*Sqrt[f]*#1 - 2*c*d*#1^2 + 4*a*f*#1^2 + c*#1^4 & , (B*d*Log[-(Sqrt[f]*x) + Sqrt[d
 + e*x + f*x^2] - #1] - A*e*Log[-(Sqrt[f]*x) + Sqrt[d + e*x + f*x^2] - #1] + 2*A*Sqrt[f]*Log[-(Sqrt[f]*x) + Sq
rt[d + e*x + f*x^2] - #1]*#1 - B*Log[-(Sqrt[f]*x) + Sqrt[d + e*x + f*x^2] - #1]*#1^2)/(a*e*Sqrt[f] + c*d*#1 -
2*a*f*#1 - c*#1^3) & ]/2

________________________________________________________________________________________

Maple [A]
time = 0.14, size = 425, normalized size = 0.54

method result size
default \(-\frac {\left (A c +B \sqrt {-a c}\right ) \ln \left (\frac {-\frac {2 \left (-\sqrt {-a c}\, e +f a -c d \right )}{c}+\frac {\left (2 f \sqrt {-a c}+c e \right ) \left (x -\frac {\sqrt {-a c}}{c}\right )}{c}+2 \sqrt {-\frac {-\sqrt {-a c}\, e +f a -c d}{c}}\, \sqrt {f \left (x -\frac {\sqrt {-a c}}{c}\right )^{2}+\frac {\left (2 f \sqrt {-a c}+c e \right ) \left (x -\frac {\sqrt {-a c}}{c}\right )}{c}-\frac {-\sqrt {-a c}\, e +f a -c d}{c}}}{x -\frac {\sqrt {-a c}}{c}}\right )}{2 \sqrt {-a c}\, c \sqrt {-\frac {-\sqrt {-a c}\, e +f a -c d}{c}}}-\frac {\left (-A c +B \sqrt {-a c}\right ) \ln \left (\frac {-\frac {2 \left (\sqrt {-a c}\, e +f a -c d \right )}{c}+\frac {\left (-2 f \sqrt {-a c}+c e \right ) \left (x +\frac {\sqrt {-a c}}{c}\right )}{c}+2 \sqrt {-\frac {\sqrt {-a c}\, e +f a -c d}{c}}\, \sqrt {f \left (x +\frac {\sqrt {-a c}}{c}\right )^{2}+\frac {\left (-2 f \sqrt {-a c}+c e \right ) \left (x +\frac {\sqrt {-a c}}{c}\right )}{c}-\frac {\sqrt {-a c}\, e +f a -c d}{c}}}{x +\frac {\sqrt {-a c}}{c}}\right )}{2 \sqrt {-a c}\, c \sqrt {-\frac {\sqrt {-a c}\, e +f a -c d}{c}}}\) \(425\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((B*x+A)/(c*x^2+a)/(f*x^2+e*x+d)^(1/2),x,method=_RETURNVERBOSE)

[Out]

-1/2*(A*c+B*(-a*c)^(1/2))/(-a*c)^(1/2)/c/(-(-(-a*c)^(1/2)*e+f*a-c*d)/c)^(1/2)*ln((-2*(-(-a*c)^(1/2)*e+f*a-c*d)
/c+(2*f*(-a*c)^(1/2)+c*e)/c*(x-(-a*c)^(1/2)/c)+2*(-(-(-a*c)^(1/2)*e+f*a-c*d)/c)^(1/2)*(f*(x-(-a*c)^(1/2)/c)^2+
(2*f*(-a*c)^(1/2)+c*e)/c*(x-(-a*c)^(1/2)/c)-(-(-a*c)^(1/2)*e+f*a-c*d)/c)^(1/2))/(x-(-a*c)^(1/2)/c))-1/2*(-A*c+
B*(-a*c)^(1/2))/(-a*c)^(1/2)/c/(-((-a*c)^(1/2)*e+f*a-c*d)/c)^(1/2)*ln((-2*((-a*c)^(1/2)*e+f*a-c*d)/c+1/c*(-2*f
*(-a*c)^(1/2)+c*e)*(x+(-a*c)^(1/2)/c)+2*(-((-a*c)^(1/2)*e+f*a-c*d)/c)^(1/2)*(f*(x+(-a*c)^(1/2)/c)^2+1/c*(-2*f*
(-a*c)^(1/2)+c*e)*(x+(-a*c)^(1/2)/c)-((-a*c)^(1/2)*e+f*a-c*d)/c)^(1/2))/(x+(-a*c)^(1/2)/c))

________________________________________________________________________________________

Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x^2+a)/(f*x^2+e*x+d)^(1/2),x, algorithm="maxima")

[Out]

integrate((B*x + A)/((c*x^2 + a)*sqrt(f*x^2 + x*e + d)), x)

________________________________________________________________________________________

Fricas [B] Leaf count of result is larger than twice the leaf count of optimal. 6737 vs. \(2 (741) = 1482\).
time = 25.99, size = 6737, normalized size = 8.64 \begin {gather*} \text {Too large to display} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x^2+a)/(f*x^2+e*x+d)^(1/2),x, algorithm="fricas")

[Out]

-1/4*sqrt(-(2*A*B*a*c*e - (B^2*a*c - A^2*c^2)*d + (B^2*a^2 - A^2*a*c)*f + (a*c^3*d^2 - 2*a^2*c^2*d*f + a^3*c*f
^2 + a^2*c^2*e^2)*sqrt(-(4*A^2*B^2*c^2*d^2 - 8*A^2*B^2*a*c*d*f + 4*A^2*B^2*a^2*f^2 + (B^4*a^2 - 2*A^2*B^2*a*c
+ A^4*c^2)*e^2 + 4*((A*B^3*a*c - A^3*B*c^2)*d - (A*B^3*a^2 - A^3*B*a*c)*f)*e)/(a*c^5*d^4 - 4*a^2*c^4*d^3*f + 6
*a^3*c^3*d^2*f^2 - 4*a^4*c^2*d*f^3 + a^5*c*f^4 + a^3*c^3*e^4 + 2*(a^2*c^4*d^2 - 2*a^3*c^3*d*f + a^4*c^2*f^2)*e
^2)))/(a*c^3*d^2 - 2*a^2*c^2*d*f + a^3*c*f^2 + a^2*c^2*e^2))*log(-(4*((A*B^3*a*c + A^3*B*c^2)*d*f - (A*B^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*c^2*f^2)*e^2)))/x) - 1/4*sqrt(-(2*A*B*a*c*e - (B^2*a*c - A^2*c^2)*d + (B^2
*a^2 - A^2*a*c)*f - (a*c^3*d^2 - 2*a^2*c^2*d*f ...

________________________________________________________________________________________

Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \int \frac {A + B x}{\left (a + c x^{2}\right ) \sqrt {d + e x + f x^{2}}}\, dx \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x**2+a)/(f*x**2+e*x+d)**(1/2),x)

[Out]

Integral((A + B*x)/((a + c*x**2)*sqrt(d + e*x + f*x**2)), x)

________________________________________________________________________________________

Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((B*x+A)/(c*x^2+a)/(f*x^2+e*x+d)^(1/2),x, algorithm="giac")

[Out]

Exception raised: TypeError >> An error occurred running a Giac command:INPUT:sage2:=int(sage0,sageVARx):;OUTP
UT:sym2poly/r2sym(const gen & e,const index_m & i,const vecteur & l) Error: Bad Argument ValueWarning, integra
tion of abs

________________________________________________________________________________________

Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {A+B\,x}{\left (c\,x^2+a\right )\,\sqrt {f\,x^2+e\,x+d}} \,d x \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((A + B*x)/((a + c*x^2)*(d + e*x + f*x^2)^(1/2)),x)

[Out]

int((A + B*x)/((a + c*x^2)*(d + e*x + f*x^2)^(1/2)), x)

________________________________________________________________________________________